package com.neusoft.service.impl;

import com.neusoft.bean.PrescriptionBean;
import com.neusoft.mapper.PrescriptionMapper;
import com.neusoft.service.PrescriptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

@Service
public class PrescriptionServiceImpl implements PrescriptionService {
    @Autowired
    PrescriptionMapper prescriptionMapper;

    @Override
    public void savePrescription(PrescriptionBean prescription) {
        prescription.setCreationTime(LocalDateTime.now());
        prescription.setDrugState("已开立");
        prescriptionMapper.insertPrescription(prescription);
    }
}
